<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>附件管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__ADMIN__css/style.css"  media="all">
  <link rel="stylesheet" href="__ADMIN__layui/css/layui.css"  media="all">
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<div class="pad-20">
<fieldset class="layui-elem-field layui-field-title">
<legend>附件管理</legend>
</fieldset>
<eq name="category['is_lower']" value="1"><div class="news_search" style="margin-bottom:20px;">
  <div class="layui-inline">
    <a href="{:U('index?dir=' . base64_encode(dirname($dir_path)))}" class="layui-btn">返回上层目录</a>
  </div>
</div></eq>
<form name="myform" id="myform" action="" method="post">
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col >
      <col width="200">
    </colgroup>
    <thead>
      <tr>
        <th>目录／文件名称</th>
        <th>管理操作</th>
      </tr>
    </thead>
    <tbody>
    <volist name="list" id="val">
      <if condition="is_dir($val)">
      <tr>
        <td><img src="__ADMIN__/ico/jia.ico" width="50" /> {:basename($val)}</td>
        <td>
            <a href="{:U('index?dir='. base64_encode($val))}" class="layui-btn layui-btn-mini"><i class="layui-icon">&#xe609;</i>打开文件夹</a>
        </td>
      </tr>
      <else/>
      <tr>
        <td><img src="__ADMIN__/ico/{:pathinfo($val, PATHINFO_EXTENSION)}.ico" width="50" /> {:basename($val)}</td>
        <td>
          <a href="/{$val}" target="BigImg" class="layui-btn layui-btn-mini"><i class="layui-icon">&#xe609;</i>查看</a>
          <a class="layui-btn layui-btn-danger layui-btn-mini" href="{:U('delFile?dir='. base64_encode($val))}" onclick="return confirm('文件删除后将无法恢复，确认删除此文件吗？')"><i class="layui-icon">&#xe640;</i>删除</a>
        </td>
      </tr>
      </if>
    </volist>
    </tbody>
  </table>
</div>
</form>
</div>
<div class="yzui-filler"></div>
<script src="__ADMIN__js/jquery-1.9.1.min.js" charset="utf-8"></script>
<script src="__ADMIN__layui/layui.js" charset="utf-8"></script>
<script>
  layui.use('form', function(){
    var $ = layui.jquery, form = layui.form();
  });
</script>
</body>
</html>
